//
//  PYToastManager.swift
//  YuanJuBian
//
//  Created by PerhapYs on 2022/1/14.
//

import Foundation

#if canImport(Toast_Swift)
import Toast_Swift

struct PYToast{
    
    static func toast(_ toast:String , toView:UIView?){
        
        var style = ToastStyle()
        style.horizontalPadding = 40
        style.verticalPadding = 20
        toView?.makeToast(toast,position:.center,style:style)
    }
    
    static func toast(_ toast:String){
        self.toast(toast, toView: CtnManager.shared.window)
    }

    static func debugToast(_ toast:String){
        
        #if DEBUG
        self.toast(toast)
        #endif
    }
}

#endif
